home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Herra / TIMWIN.ZIP / DPARTS1.CMD < prev    next >
OS/2 REXX Batch file  |  1993-09-22  |  2KB  |  86 lines

  1. ;parts1  -   binary processing of image 'parts'
  2. ;expects:    image 'parts' processed using 'parts.cmd'
  3. ;            stored in 'b', original in 'a'
  4. ;            LUT's cf. *ini
  5. ;21-3-92 Windows versie
  6. ;**********************************************************
  7. #include timdefs.h
  8.  
  9. parms
  10.   int windis
  11. endparms
  12.  
  13. int numobj
  14. int endpix
  15. int num
  16. int thickobj
  17. int numpix
  18. int err
  19.  
  20. era q
  21. era s
  22. curs s 128 128
  23. err = chk lut 4        ;display 3 bitplanes
  24. era p 1 2 3
  25. dest p
  26. show p
  27. ;*windispl h (windis+NO_DITHER+4)
  28. numobj = label b
  29. *windispl i (windis+NO_DITHER+WINLUT4)
  30. bord 129
  31. dest q
  32. cls
  33. print @12  "Part Codes:"
  34. print @8   "r    = resistor"
  35. print @8   "c    = condensor"
  36. print @8   "tr.s = transistor small"
  37. print @8   "tr.p = transistor power"
  38. print @8   "led  = light em. diode"
  39. print @8   "dil  = dual-in-line ic"
  40. print @8   "to#  = analog ic"
  41.  
  42. for num = 1 to numobj step 1
  43.  numpix = mark p num 3
  44.  era s
  45.  copy qc sc
  46.  endpix = numpix - (lsk sc 2) - (lenp sc 2)
  47.  thickobj = numpix - (ler sc 1 9)
  48.  curs a q
  49.  and ac 0f8h
  50.  bord qc 4
  51.  if endpix > 10
  52.   text "dil%d", endpix
  53.  else
  54.   if endpix > 4
  55.     text "to#%d", endpix
  56.   else
  57.     if endpix == 2
  58.       if thickobj == 0
  59.         text "r"
  60.       else
  61.         text "c"
  62.       endif
  63.     else
  64.       if endpix == 3
  65.         if thickobj == 0
  66.           text "led"
  67.         else
  68.           textv "tr.p"
  69.         endif
  70.       endif
  71.       if endpix == 4
  72.         if thickobj == 0
  73.           textv "tr.s"
  74.         else
  75.           textv "tr.p"
  76.         endif
  77.       endif
  78.     endif
  79.   endif
  80.  endif
  81.  *windispl i (windis+NO_DITHER)
  82. next
  83.  
  84. stop
  85. 
  86.